



<h3>Import Data</h3>
Peraturan :<br />
<ul>
	<li>Download Template -> <a href="<?php echo Yii::app()->request->baseUrl; ?>/template.xlsx">Download Template</a></li>
	<li>Pada Kolom tanggal Lahir dan tanggal daftar isikan tanggal sesuai dengan format (dd-mm-yyyy)</li>
	<li>Pada Kolom Jenis Kelamin isikan L untuk laki-laki dan P untuk perempuan</li>
</ul>
<div class="form">
<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm',array(
	'id'=>'data-jamaah-form',
	'enableAjaxValidation'=>false,
        'method'=>'post',
	//'type'=>'horizontal',
	'htmlOptions'=>array(
		'enctype'=>'multipart/form-data'
	)
)); ?>
     	
<div class="control-group ">
	<label class="control-label required" for="Disposisi_tanggal">
	Upload File Excel <span class="required">*</span></label>
	<div class="controls">
	<?php $this->widget('ext.EAjaxUpload.EAjaxUpload',
		array(
				'id'=>'nama_file',
				'config'=>array(
					   'action'=>Yii::app()->createUrl('/mstClientPersons/sendFile'),
					   'allowedExtensions'=>array("xlsx"),//array("jpg","jpeg","gif","exe","mov" and etc...
					   'sizeLimit'=>10*1024*1024,// maximum file size in bytes
					   'minSizeLimit'=>0*1024*1024,// minimum file size in bytes
					   'onComplete'=>"js:function(id, fileName, responseJSON){ $('#namafile').val(responseJSON['filename']); }",
					   'messages'=>array(
					                     'typeError'=>"{file} has invalid extension. Only {extensions} are allowed.",
					                     'sizeError'=>"{file} is too large, maximum file size is {sizeLimit}.",
					                    'minSizeError'=>"{file} is too small, minimum file size is {minSizeLimit}.",
					                     'emptyError'=>"{file} is empty, please select files again without it.",
					                     'onLeave'=>"The files are being uploaded, if you leave now the upload will be cancelled."
					                    ),
					   'showMessage'=>"js:function(message){ alert(message); }"
					  )
		)); ?>
		
	<?php echo CHtml::textField('file_name','',array('style'=>'display:none;','id'=>'namafile','class'=>'span5','maxlength'=>255)); ?>
	</div></div> 

	
	
	<div class="form-actions">
		<?php $this->widget('bootstrap.widgets.TbButton', array(
			'buttonType'=>'submit',
			'type'=>'primary',
                        'icon'=>'ok white',  
			'label'=>'Import',
		)); ?>
	</div>

<?php $this->endWidget(); ?>

</div>



